package main

import (
	"common/config"
	"common/initialization"
	"google.golang.org/grpc"
	"order_srv/Grpc"
	"order_srv/service"
)

func main() {
	initialization.InitLogs()
	config.InitViper()
	initialization.InitNachos()
	cf := initialization.Config.OrderServer
	initialization.InitConsul("order_srv", cf.Port)
	initialization.InitMysql()
	initialization.InitRedis()
	Grpc.RegisterGrpc(cf.Hort, cf.Port, func(server *grpc.Server) {
		service.Register(server)
	})

}
